package homework.day319.demo1;

public class Animal {
    private String name;
    public void eat(){
        System.out.println("动物在吃饭");
    }

    public Animal() {
    }

    public Animal(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "我的名字叫"+name;
    }
}
